import request from './request'

export const GetUserInfo = () => {
  return request({
    url: '/system/user',
    method: 'GET'
  })
}

export const CreateUser = data => {
  return request({
    url: '/system/user',
    method: 'POST',
    data
  })
}

export const SetUserInfo = data => {
  return request({
    url: '/system/user',
    method: 'PATCH',
    data
  })
}

export const SetPassword = data => {
  return request({
    url: '/system/user/password',
    method: 'PATCH',
    data
  })
}

export const UserList = params => {
  return request({
    url: '/system/user/list',
    method: 'GET',
    params
  })
}
